How to use ItemBand in Subreport when coding it with Pentaho Reporting Engine?
I have defined my ItemBand as follow :
ItemBand rowBand = new ItemBand();
TextFieldElementFactory textFactory3 = new TextFieldElementFactory();
textFactory3.setFieldname("reportname");
Element element = textFactory3.createElement();
element.setDynamicContent(true);
rowBand.addElement(element);
itemBand2.addElement(rowBand);
Now how do I use the ItemBand in my subreport?
Tests for the project are usually helpfull in such cases https://github.com/pentaho/pentaho-reporting/blob/85b5bb6c1b970f1c2648a6bf06b7cf66b9fd0c0b/engine/core/test-src/org/pentaho/reporting/engine/classic/core/SubReportIT.java
Thanks,
I was able to do it by :
RelationalGroup subgroup = new RelationalGroup();
GroupDataBody subgroupData = new GroupDataBody();
ItemBand itemBand = new ItemBand();
itemBand.setVisible(true);
subgroupData.setItemBand(itemBand);
subgroup.setBody(subgroupData);
subReport.setRootGroup(subgroup);
ItemBand rowBand = new ItemBand();
rowBand.setLayout(BandStyleKeys.LAYOUT_ROW);
TextFieldElementFactory subtext = new TextFieldElementFactory();
subtext.setFieldname("reportname");
subtext.setX(new Float(12.0));
subtext.setMinimumWidth(new Float(100.0));
subtext.setHeight(new Float(20.0));
Element subelement = subtext.createElement();
subelement.setDynamicContent(true);
rowBand.addElement(subelement);
TextFieldElementFactory subtext2 = new TextFieldElementFactory();
subtext2.setFieldname("reportheader");
subtext2.setX(new Float(112.0));
subtext2.setMinimumWidth(new Float(100.0));
subtext2.setHeight(new Float(20.0));
Element subelement2 = subtext2.createElement();
subelement2.setDynamicContent(true);
rowBand.addElement(subelement2);
itemBand.addElement(rowBand);
report.getReportFooter().addSubReport(subReport);
Related
What is the correct way of getting PidLidEndRecurrenceDate values using Ews. below code does not give proper result. property details that i am looking is https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxprops/816378cf-07ef-4926-b7d2-53475792403d
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Credentials = new WebCredentials("X#X.com", "XXX");
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
ItemView view = new ItemView(10);
Guid MyPropertySetId = new Guid("{6ED8DA90-450B-101B-98DA-00AA003F1305}");
int intValue = Convert.ToInt32("0x0000000F", 16);
ExtendedPropertyDefinition extendedPropertyDefinition =
new ExtendedPropertyDefinition(MyPropertySetId, intValue, MapiPropertyType.Integer);
view.PropertySet =
new PropertySet(BasePropertySet.IdOnly, ItemSchema.Subject, extendedPropertyDefinition);
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Calendar, view);
foreach (Item item in findResults.Items)
{
Console.WriteLine(item.Subject);
if (item.ExtendedProperties.Count > 0)
{
// Display the extended name and value of the extended property.
foreach (ExtendedProperty extendedProperty in item.ExtendedProperties)
{
Console.WriteLine(" Extended Property Name: " + extendedProperty.PropertyDefinition.Name);
Console.WriteLine(" Extended Property Value: " + extendedProperty.Value);
}
}
}
That property is set on the Meeting invite messages only not on the Master instance of the Calendar Appointments which is what you seem to be looking at. For the Master instances you should just be able to use the strongly typed property https://learn.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.recurrence.enddate?redirectedfrom=MSDN&view=exchange-ews-api#Microsoft_Exchange_WebServices_Data_Recurrence_EndDate
It you wanted to view the property you have above search the SentItems Folder for invites with recurrences (with Enddates) and that's where you will see it. Or probably easier just look at the messages with a Mapi editor like OutlookSpy or MFCMAPI and you will see the properties available.
Well I was wondering why i can't save ringtones on windows phone
SaveRingtone ringtone = new SaveRingtone();
ringtone.Source = new Uri("appdata:/"+path);
ringtone.DisplayName = b.Content.ToString();
ringtone.Completed += Ringtone_Save_completed;
ringtone.Show();
this is my code
Well you was so close.
The class SaveRingtone it is SaveRingtoneTask
SaveRingtoneTask ringtone = new SaveRingtoneTask();
ringtone.Source = new Uri("appdata:/"+path);
ringtone.DisplayName = b.Content.ToString();
ringtone.Completed += Ringtone_Save_completed;
ringtone.Show();
and you will need to add
using Microsoft.Phone.Tasks;
I am new to Linq and trying to get a handle on how to bind a drop down to a SQL user defined function.
//Populate the Pledge dropdown
var db = new App_Data.MyDBDataContext();
int? partnerID = Convert.ToInt32(Request.QueryString["PartnerID"]);
var pledges =
from p in db.ufn_AvailablePledgesByPartner(partnerID)
select new
{
PledgeAndPartnerName = p.PledgeAndPartnerName,
PledgeID = p.PledgeID
};
DropDownList ddlPledgeID = (DropDownList)DetailsViewContribution.FindControl("DropDownListPledgeID");
ddlPledgeID.DataSource = pledges;
ddlPledgeID.DataTextField = pledges.PledgeAndPartnerName;
ddlPledgeID.DataValueField = pledges.PledgeID;
The current problem is the last 2 lines where I'm trying to reference properties of the anonymous class. "'System.Linq.IQueryable' does not contain a definition for 'PledgeAndPartnerName' and no extension method..." I naively thought the compiler was supposed to figure this out, but obviously I'm assuming C# is now more dynamic than it really is.
Thanks for any input.
Try this:
ddlPledgeID.DataTextField = "PledgeAndPartnerName";
ddlPledgeID.DataValueField = "PledgeID";
so.... eval() out of the question, any idea to do this? I also don't know how to use "this" expression or set() in actionscript 3 ( i seem couldn't find any complete reference on it ), just say through php file a multiple variable (test1, test2, test3,...) sent by "echo", how the flash aplication recieved it? I'm trying not to use xml on mysql to php to flash aplication. Simply how to change a string to a variable ?
example
(in as3-actions frame panel)
function datagridfill(event:MouseEvent):void{
var varfill:URLVariables = new URLVariables();
varfill.tell = "do it";
var filler:URLRequest = new URLRequest();
filler.url = "http://127.0.0.1/flashdbas3/sendin.php";
filler.data = varfill;
var filling:URLLoader = new URLLoader();
filling.dataFormat = URLLoaderDataFormat.VARIABLES;
filling.load(filler);
filling.addEventListener(Event.COMPLETE, datain);
function datain(evt:Event){
var arraygrid:Array = new Array();
testing.text = evt.target.Name2 // worked
// just say i = 1
i=1;
arraygrid.push({Name:this["evt.target.Name"+i],
Test:this.["evt.target.Test"+i]}); // error
//or
arraygrid.push({Name:this["Name"+i],
Test:this.["Test"+i]}); // error too
// eval() noexistent, set() didn't worked on actions frame panel
//?????
}
};
I hope it's very clear.
You could use this[varName] if I understand your question right.
So if varName is a variable containing a string which should be a variables name, you could set and read that variable like this:
this[varName] = "someValue";
trace(this[varName]);
Update:
In your example, you could try: evt.target["Test"+i] instead of Test:this.["evt.target.Test"+i]
If you have a set of strings that you'd like to associate with values, the standard AS3 approach is to use an object as a hash table:
var o = {}
o["test1"] = 7
o["test2"] = "fish"
print(o["test1"])
I have a requirement of generating the rdl in runtime. so I converted the http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition xsd to class and I need to create object for Report class with that it has lot of classes. I am struggling in the report generation using objects
I don't know how to assign values
[System.Xml.Serialization.XmlAnyElementAttribute()]
[System.Xml.Serialization.XmlElementAttribute("Author", typeof(string))]
[System.Xml.Serialization.XmlElementAttribute("AutoRefresh", typeof(uint))]
[System.Xml.Serialization.XmlElementAttribute("Body", typeof(BodyType))]
private ItemsChoiceType37[] itemsElementNameField;
Please help me.
It is something like
List<object> items = new List<object>();
List<ItemsChoiceType37> itemChoices = new List<ItemsChoiceType37>();
//Author
items.Add("Author name");
itemChoices.Add(ItemsChoiceType37.Author);
items.Add(description);
itemChoices.Add(ItemsChoiceType37.Description);
//Width
items.Add("11in");
itemChoices.Add(ItemsChoiceType37.Width);
.
.
.
Report report = new Report();
report.Items = items.ToArray();
report.ItemsElementName = itemChoices.ToArray();
I hope it may help you