Rendering checkbox in PDF Report - genexus

I need to show checked and unchecked checkboxes in a PDF report, generated with GeneXus.
The checkbox layout (checked or unchecked) depends by the boolean value of the relative variable.
How I can do that?
I'm using a Procedure.
Thanks!

The solution can be this:
include two image in the project (unchecked checkbox and checked checkbox)
adding one image variable in the procedure for each checkbox
putting the image variable in the report layout
change the image in the variable with code like this:
if(&booleanVariable)
&imageVariable.FromImage(checked_Image)
else
&imageVariable.FromImage(unchecked_Image)
endif
I hope this can be useful for you.

Related

Is it possible to Hide Column in Editable grid view of D365?

I've tried doing it with exporting the solution and changes the XML code and then importing it again.
as you can see in the image two bars after 'Do You Want to' column. But when I open this grid in Unified client interface it is still visible.
like in this grid.if 'isAllowOverride' is True I want to make 'Do you want to' be editable. But 'isAllowOverride' has to be invisible from User end.
Not sure why you are editing the xml for such customization. But this can be easily configured in UI itself.
Go to the form editor, open the subgrid properties, check the view it’s configured to show, edit the view columns to remove the unwanted ones, save the view and set the subgrid with the correct edited view again (there’s a product bug which switch to the default Active view), save & publish the form. That’s it.
Update:
We cannot have two different layouts for Display mode vs Edit mode. That being said, you have to disable the editable grid columns based on conditions.

admin on rest in create form - Generated the TextInput by loop. If I type anything in one text-box, it is reflecting in all other generated text-box

I created the TextInput by loop. If I type anything in one text-box, it is reflecting in all other textbox's as well. How to prevent this reflecting one textbox value into others textbox's automatically.
You should set it's source property. But it's always best to show an example of your problem in a codesandbox.

Showing image(coming from database) dynamically in crystal report using ImagePath C#

I store image path in database like this: UploadedImage/FabricImage/11115.JPG.
I want to show them dynamically in a crystal report. Can anyone help me?
Use a conditional formula to dynamically change the location of a report’s image.
Add an image to the report: -> Insert -> PictureThis image will act as a placeholder.Ensure that the placeholder is the same size as the one that will be dynamically loaded, otherwise the image will be scaled.
Change the image’s Graphic Location:
right click image
select Format Graphic…
select Picture tab
click the conditional-formula button (looks like x+2)
set the formula’s text to the name of the formula or parameter field that will contain the image’s URL
save the formula and click the OK button
Save the report
Source: cogniza.com

Xpages link to open document view

I want to add an option to the row of the view: the possibility to open the document when clicking on the row. It is possible? How can I achieve this?
Add displayAs="link" to viewColumn. Then it is rendered as link and opens the document if you click on it. You can also choose to open it in edit or read mode.
Set the attributes in properties panel:
Update:
You can open the corresponding document clicking somewhere on a viewPanel's row (not just on a column's link) if you add a rowAttrs property.
Add the following code to your viewPanel:
<xp:viewPanel
rows="30"
id="viewPanel1"
var="row">
...
<xp:this.rowAttrs>
<xp:attr
value="window.open('#{javascript:row.getOpenPageURL(null, true)}', '_self')"
name="onclick"
rendered="#{javascript:!(row.isCategory() | row.isTotal()) }">
</xp:attr>
</xp:this.rowAttrs>
</xp:viewPanel>
Set viewPanel's row variable to var="row". The attribute attr gets rendered for all rows which are represent a document. It adds an individual onclick event to those rows and executes CSJS code defined in value. This CSJS code contains a SSJS part which inserts the URL of the document as window.open's parameter.
If you set getOpenPageURL's second parameter to false then document will be opened in edit mode.
Look here for a detailed description.
I think there is no easy way ;-) Maybe JQuery is your friend to add a on click event to the row with needed

Sitecore page editor dropdown

I would kindly ask for your help :) From couple of days I am trying to achieve "linked" custom field in content editor and dropdown in page editor.
Basically I want to have dropdown in page editor and content editor which are responsible for a same thing.
In my c# code i have enums which represent directions. I created custom field which accepts assembly and class with overridden onload method and successfully populate dropdown values in the content editor. So far so good but i have no idea how to create dropdown which will represent the same functionality inside page editor.
So please give me any ideas...
Judging from your reply to my comment you need to think of the following: How is my field value being rendered onto a page?
If you are always using 1 control to do this then you just need to ensure that this control has 2 different rendering modes depending on the Context.PageMode
But as I understand it you want this dropdown to also appear when someone renders your custom field using a <sc:FieldRenderer>. In this case you'll need to look into the RenderField pipeline of Sitecore. There you find a processor called RenderWebEditing. Possibly through some manipulation here you can get your dropdown appear as you wish.

Resources