Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

images

I seem to be having trouble displaying images in a reporttable.
I've tried the headerimage and the itemimage and the list property but no images seem to be displaying.

I've set the imagelist property to this image
with a framecount of 7.

I set the columndatasource of the relevant column and then I've tried both list and item image properties.

Is there some other flag somewhere that I've likely overlooked?

Comments

  • Disregard above. The image height was too large so nothing showed.
    As a further test I made the fixedrowheight to 50 and voila, pretty stars all down the column
  • Nothing to see here...move along.
  • I was going to reply but I've left already
  • Hi AusMarkB,

    I'm trying to use FixedRowHeight, but it doesn't work, no matter what value I put, the row height is the same as the font. any idea?
  • Sorry, not really.
    I use reporttables all the time but I've only used fixedrowheight once which I assume was back when this post was started.
    Appears to work as advertised though.
    Whilst this is an unlikely fix, if I was having the anomalies you seem to be having I reckon I'd be at a point now where I'd just unregister the srpcontrol and then re-register it just to make sure I was using the version I thought I was.
    I know it's a kind of switch it off and back on again fix but sometimes that just works.
  • @slowjams if you continue to experience problems with the SRP ReportTable, might I suggest you bundle up a quick RDK and send this to us (support@srpcs.com). We'll be happy to look at your code and let you know if this is something we need to fix or explain what is wrong with your code.
  • edited June 2018
    Hi DonBakke,

    We are currently using version 4.0.5, could it be a problem?

    I don't think a RDK will work because everything depends on my company's own framework

    so this is the code you actually need:

    Ctrl = @Window:".OLE_REPORT"

    ***you can change to the location of your image********
    img_path = "placeholder"
    *******************************************************
    Set_Property(Ctrl, "OLE.ImageList", img_path:@FM:10:@FM:RGB(255, 0, 255))


    Columns = ""
    Columns<-1> = "State" :@VM:"T":@VM:80
    Columns<-1> = "County" :@VM:"T":@VM:80
    Columns<-1> = "Subject":@VM:"T":@VM:150
    Columns<-1> = "Number" :@VM:"N":@VM:80:@VM:@VM:@VM:@VM:@VM:@VM:@VM:"Right":@VM:@VM:"$#,##0.000":@VM:1:@VM:@VM:@VM:"R"
    Set_Property(Ctrl, "OLE.ColumnList", Columns)


    Set_Property(Ctrl, "OLE.ColumnDataSource[1]", "ImageAndText")


    Data = ""
    Data := 5:@SVM:"Oregon":@VM:"Klamath":@VM:"Under 5 years":@VM:4000:@FM
    Data := 5:@SVM:"Oregon":@VM:"Klamath":@VM:"5 to 9 years":@VM:3964:@FM
    Data := 5:@SVM:"Oregon":@VM:"Klamath":@VM:"10 to 14 years":@VM:4179:@FM
    Data := 5:@SVM:"Oregon":@VM:"Klamath":@VM:"15 to 19 years":@VM:4605:@FM
    Data := 5:@SVM:"Oregon":@VM:"Klamath":@VM:"20 to 24 years":@VM:4271:@FM
    Data := 5:@SVM:"Oregon":@VM:"Klamath":@VM:"25 to 29 years":@VM:3607:@FM
    Data := 5:@SVM:"Oregon":@VM:"Jackson":@VM:"Under 5 years":@VM:11942:@FM
    Data := 5:@SVM:"Oregon":@VM:"Jackson":@VM:"5 to 9 years":@VM:11775:@FM
    Data := 5:@SVM:"Oregon":@VM:"Jackson":@VM:"10 to 14 years":@VM:12582:@FM
    Data := 5:@SVM:"Oregon":@VM:"Jackson":@VM:"15 to 19 years":@VM:13249:@FM
    Data := 5:@SVM:"Oregon":@VM:"Jackson":@VM:"20 to 24 years":@VM:12176:@FM
    Data := 5:@SVM:"Oregon":@VM:"Jackson":@VM:"25 to 29 years":@VM:11908:@FM
    Data := 6:@SVM:"California":@VM:"Orange":@VM:"Under 5 years":@VM:191691:@FM
    Data := 6:@SVM:"California":@VM:"Orange":@VM:"5 to 9 years":@VM:198769:@FM
    Data := 6:@SVM:"California":@VM:"Orange":@VM:"10 to 14 years":@VM:210195:@FM
    Data := 6:@SVM:"California":@VM:"Orange":@VM:"15 to 19 years":@VM:227689:@FM
    Data := 6:@SVM:"California":@VM:"Orange":@VM:"20 to 24 years":@VM:213601:@FM
    Data := 6:@SVM:"California":@VM:"Orange":@VM:"25 to 29 years":@VM:215362:@FM
    Data := 6:@SVM:"California":@VM:"Sacramento":@VM:"Under 5 years":@VM:101063:@FM
    Data := 6:@SVM:"California":@VM:"Sacramento":@VM:"5 to 9 years":@VM:98112:@FM
    Data := 6:@SVM:"California":@VM:"Sacramento":@VM:"10 to 14 years":@VM:99820:@FM
    Data := 6:@SVM:"California":@VM:"Sacramento":@VM:"15 to 19 years":@VM:105680:@FM
    Data := 6:@SVM:"California":@VM:"Sacramento":@VM:"20 to 24 years":@VM:101908:@FM
    Data := 6:@SVM:"California":@VM:"Sacramento":@VM:"25 to 29 years":@VM:107922
    Set_Property(Ctrl, "OLE.List", Data)

    // the image can be inserted into the column header
    Set_Property(Ctrl, "OLE.ColumnImage[1]", 1)

    *******Question 1 **********************
    // but the image cannot be inserted into the first cell
    Set_Property(Ctrl, "OLE.ItemImage[1;1]", 1)

    *******Question 2 **********************
    // another problem is that no matter what value I put and where I place this statement, the FixedRowHeight doesn't work, always keep the same height as the current font
    //Set_Property(Ctrl, "OLE.FixedRowHeight", 999)


    this is the screenshot:


    You can see the the image works in the column header but not in the first cell
  • I have no way of knowing if v4.0.5 is the problem or not. If you want to rule this in or out, please download the latest release and test it yourself.

    When we request an RDK we are looking for something that is written independent of a framework. This is intentional. First, it forces you to test your code in a simpler and cleaner environment and thus rule out interference by your own framework. Second, it gives us a portable copy of your system that is easy for us to install and test.
Sign In or Register to comment.