We do load our reports @runtime and it works just fine, you may check the file path.
And we don't expose our .fr3 to the public it always in folder that can't be reach from the internet.
Easy, then call your button from the js code (at load event as shown in picture like this:)
MainForm.mybutton.fireEvent('click',MainForm.mybutton);
Remember for security issue the button should be visible otherwise it will not work (at design time) in order to hide it @ runtime then use UniEvents->beforeInit and set hidden to true:
function beforeInit(sender, config)
{
config.hidden=true;
}
OR
Put your button on UniHiddenPanel 🙂
It will NOT change !!!
You have to do it with the help of the client-side, this will help you, replace MainForm.form with your target object:
UniSession.AddJS('MainForm.form.bodyCls="desktopwallpaper1"');
and in servermodule add your css for bg images:
.desktopwallpaper1
{
background-image: .........
}
.desktopwallpaper2
{
background-image: .........
}
.desktopwallpaper3
{
background-image: .........
}
You can use the helper function NewCacheFileUrl:
targetFile:= ServerModule.NewCacheFileUrl(False, 'jpg'{file extension}, '', '', AUrl, True);
CopyFile(PChar(SrcFileName),PChar(targetFile),false);
Then use the AUrl for your end user.